import fetch from '@/api'

//预报确认
export function addForecastConfirm(entrustNo,data) {  
    return fetch({
        method:'post',
        url:`/entrust/arrive/${entrustNo}`,
        data,
    })
}
// 取消到达预报
export function cancelForecastConfirm(entrustNo,data) {
    return fetch({
        method: 'post',
        url: `/entrust/cancel/${entrustNo}`,
        data
    })
}
// 编辑
export function updateWarehouse(id,data) {
    return fetch({
        method:'put',
        url:`/warehouse/${id}`,
        data,
    })
}

// 删除
export function deleteWarehouse(id) {
    return fetch({
        method:'delete',
        url:`/warehouse/${id}`,
    })
}

//内转车分配页面展示
export function getCar(entrustNo,params) {  
    return fetch({
        method:'get',
        url:`/entrust/get/adversion/${entrustNo}`,
        params,
    })
}

//起运
export function startShip(data) {  
    return fetch({
        method:'post',
        url:`/entrust/start/transport`,
        data,
    })
}
//发运
export function batchShip(data) {  
    return fetch({
        method:'post',
        url:`pcOutStockPlan/batchDspatch`,
        data,
    })
}

//查看内转车分配详情
export function getDetailCar(id,params) {  
    return fetch({
        method:'get',
        url:`/entrust/get/transport/${id}`,
        params,
    })
}

//取消内转车分配
export function cancelDetailCar(id,params) {  
    return fetch({
        method:'get',
        url:`/entrust/cancel/transport/${id}`,
        params,
    })
}